package com.ssy.lingxi.member.merchant.entity;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 国家代码及电话号码
 * @author 万宁
 * @version 2.0.0
 * @date 2020-07-14
 */
@Entity
@Table(schema = "public", name = "ms_mc_country_code", indexes = {@Index(name = "ms_mc_country_code_type_enum_idx", columnList = "typeEnum"), @Index(name = "ms_mc_country_code_code_idx", columnList = "code")})
public class CountryCodeDO implements Serializable {
    private static final long serialVersionUID = 6347917715422790524L;

    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="country_code_seq")
    @SequenceGenerator(sequenceName="ms_mc_country_code_seq", name="country_code_seq",allocationSize = 1)
    private Long id;

    /**
     * 类型枚举（定义在CountryCodeEnum中
     */
    @Column(columnDefinition = "int2")
    private Integer typeEnum;

    /**
     * 国家代码
     */
    @Column(columnDefinition = "varchar(20)")
    private String code;

    /**
     * 国家名称
     */
    @Column(columnDefinition = "varchar(50)")
    private String name;

    /**
     * 手机号码位数
     */
    @Column(columnDefinition = "int")
    private Integer phoneLength;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getTypeEnum() {
        return typeEnum;
    }

    public void setTypeEnum(Integer typeEnum) {
        this.typeEnum = typeEnum;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPhoneLength() {
        return phoneLength;
    }

    public void setPhoneLength(Integer phoneLength) {
        this.phoneLength = phoneLength;
    }
}
